﻿// <copyright file="TrackFormControl.cs" company="Microsoft">
// Copyright (c) 2010 Microsoft All Rights Reserved
// </copyright>
// <author>Microsoft</author>
// <email>mischero@microsoft.com</email>
// <date>2010-01-01</date>
// <summary>Web analytics service behavior class definition</summary>

namespace Microsoft.WebAnalytics.Behaviors
{
    using System.ComponentModel.Composition;
    using System.Windows.Controls;
    using System.Windows.Interactivity;

    /// <summary>
    /// <img src="../media/Microsoft.WebAnalytics.Behaviors.TrackFormControl.24x24.png"/> 
    /// Track Control Events
    /// </summary>
    /// <remarks>You should use Control Tracking behaviors when raw event 
    /// tracking is not sufficient or you want to specify and use additional 
    /// parameters as properties.</remarks>
    public class TrackFormControl : Behavior<Control>
    {
        #region Properties
        #endregion

        #region Methods
        /// <summary>
        /// Attach events and initialize parts
        /// </summary>
        protected override void OnAttached()
        {
            base.OnAttached();

            CompositionInitializerEx.SatisfyImports(this);

            TrackForm.SetIsTracking(this.AssociatedObject, true);
        }
        #endregion

        #region Implementation
        #endregion
    }
}
